home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 June / ccd0605.iso / Software / Shareware / Programare / winhex / Boot Sector FAT.txt next >
Text File  |  2005-05-02  |  1KB  |  46 lines

  1. template "Boot Sector FAT"
  2.  
  3. // Template by Stefan Fleischmann
  4.  
  5. // Boot sector format for MSDOS 4.0 onwards (incl. Windows 9x)
  6. // To be applied to sector 0 of a FAT12/FAT16-formatted logical drive.
  7.  
  8. description "BIOS parameter block (BPB) and more"
  9. applies_to disk
  10. sector-aligned
  11.  
  12. requires 0x0    "EB"    // JMP instruction will usually be EB xx 90
  13. requires 0x2    "90"    // (though older drives may use E9 xx xx)
  14. requires 0x1FE "55 AA"
  15.  
  16. begin
  17.     read-only hex 3 "JMP instruction"
  18.     char[8]    "OEM"
  19.  
  20.     section    "BIOS Parameter Block"
  21.     uint16    "Bytes per sector"
  22.     uint8        "Sectors per cluster"
  23.     uint16    "Reserved sectors"
  24.     uint8        "Number of FATs"
  25.     uint16    "Root entries"
  26.     uint16    "Sectors (under 32 MB)"
  27.     hex 1        "Media descriptor (hex)"
  28.     uint16    "Sectors per FAT"
  29.     uint16    "Sectors per track"
  30.     uint16    "Heads"
  31.     uint32    "Hidden sectors"
  32.     uint32    "Sectors (over 32 MB)"
  33.     endsection
  34.  
  35.     hex 1        "BIOS drive (hex, HD=8x)"
  36.     read-only uint8 "(Unused)"
  37.     hex 1        "Ext. boot signature (29h)"
  38.     uint32    "Volume serial number (decimal)"
  39.     move -4
  40.     hex 4        "Volume serial number (hex)"
  41.     char[11] "Volume label"
  42.     char[8]    "File system"
  43.  
  44.     goto        0x1FE
  45.     read-only hex 2 "Signature (55 AA)"
  46. end